﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.TPYRS
{
    class Class5
    {
        public void Calc200(IPolicyPeriodActing ppa, IDutyActing da)
        {

            

            if (ppa.Age >= 15)
            {
                string a = ppa.PolicyActing.Policy.SelectedColRateFactors["领取方式"];
                if (a == "年领" && (ppa.Age == 15 || ppa.Age == 16 || ppa.Age == 17 ))
                {
                    da.Value = ppa.Amount;
                }
                else if (a == "一次性领" && ppa.Age == 15)
                {
                    da.Value = ppa.Amount;
                    ppa.IsCurrentFinish = true;
                }
            }



        }

        public void Calc200(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.HolderStates.Contains("重疾") )
            {
                da.Value = ppa.Amount;
                ppa.IsCurrentFinish = true;
            }

        }


        public void Calc200(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.SchemePeriodActing.HolderStates.Contains("特定手术"))
            {
                da.Value = ppa.Amount;
                ppa.IsCurrentFinish = true;
            }

        }

        public void Calc200(IPolicyPeriodActing ppa, IDutyActing da)
        {

            if (ppa.Period > 0 && (ppa.SchemePeriodActing.HolderStates.Contains("身故") || ppa.SchemePeriodActing.HolderStates.Contains("全残")))
            {
                da.Value = ppa.Amount;
                ppa.IsCurrentFinish = true;
            }

        }
    }
}
